// import articleService from '../../service/article'
import * as types from '../mutation-types'
// initial state
const state = {
  bodyWidth: 0,
  bodyHeight: 0,
  fixedHeightSmall: 76,
  fixedHeightBig: 154,
}

// getters
const getters = {
}

// actions
const actions = {
  loadBodySize({commit}) {
    return new Promise((resolve,reject) =>{
      commit(types.LOAD_BODYSIZE);
      resolve();
    })
  }
}

// mutations
const mutations = {
  [types.LOAD_BODYSIZE] (state, data) {
    state.bodyWidth = document.body.clientWidth;
    state.bodyHeight = document.body.clientHeight;
  }
}

export default {
  state,
  getters,
  actions,
  mutations
}
